﻿<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
  <!ENTITY copy "&#169;">
  <!ENTITY nbsp "&#160;">
  <!ENTITY laquo "&#171;">
  <!ENTITY raquo "&#187;">
  <!ENTITY nbsp "&#160;">
  <!ENTITY amp "&#038;">
]>
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">


  <xsl:include href="../list.xsl"/>

  <xsl:template match="/">
    <xsl:apply-templates />
  </xsl:template>

  <xsl:template match="content">
    <xsl:call-template name="Head-List"/>
    <div class="aside">
      <div class="head-slide on">
        Фильтр
      </div>
      <div class="container">
        <form action="/{$Controller}" method="post" class="filter">
          <fieldset>
            <ul class="editlist">
              <li>
                <label>по ключевому слову</label>
                <input name="s" type="text" value="{$Form/s}" class="broad100"/>
              </li>
              
              <li>
                <label>по категории</label>
                <select name="id_cat">
                  <option value="-1"> - Все - </option>
                  <xsl:for-each select="$Form/id_cat/row">
                    <option value="{id}">
                      <xsl:if test="@active">
                        <xsl:attribute name="selected">selected</xsl:attribute>
                      </xsl:if>
                      <xsl:value-of select="menu_name" />
                    </option>
                  </xsl:for-each>
                </select>
              </li>
              <li>
                <label>Язык</label>
                <select name="id_lang">
                  <option value="-1"> - Все - </option>
                  <xsl:for-each select="$Form/id_lang/row">
                    <option value="{id}">
                      <xsl:if test="@active">
                        <xsl:attribute name="selected">selected</xsl:attribute>
                      </xsl:if>
                      <xsl:value-of select="name" />
                    </option>
                  </xsl:for-each>
                </select>

              </li>
              <li>
                <label>по главной новости (top)</label>
                <select name="is_top">
                  <option value="-1"> - Все - </option>
                  <xsl:for-each select="$Form/is_top/row">
                    <option value="{id}">
                      <xsl:if test="@active">
                        <xsl:attribute name="selected">selected</xsl:attribute>
                      </xsl:if>
                      <xsl:value-of select="name" />
                    </option>
                  </xsl:for-each>
                </select>
              </li>
              <li>
                <label>по активности</label>
                <select name="is_active">
                  <option value="-1"> - Все - </option>
                  <xsl:for-each select="$Form/is_active/row">
                    <option value="{id}">
                      <xsl:if test="@active">
                        <xsl:attribute name="selected">selected</xsl:attribute>
                      </xsl:if>
                      <xsl:value-of select="name" />
                    </option>
                  </xsl:for-each>
                </select>
              </li>
              <li class="submit">
                <input name="save" type="submit" id="save" style="font-weight: bold;" value="Применить" />
                <input name="reset" type="submit" id="reset" value="Показать все" />
              </li>
            </ul>
          </fieldset>
        </form>
      </div>




    </div>


    <div class="article">
      <xsl:apply-templates select="Main/List" />
    </div>    
  </xsl:template>
</xsl:stylesheet>